import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

const routes = [
  {
    path:"/",
    component:()=>import('@/pages/cartPage')
  },
  {
    path: "/find",
    name: "home",
    component:()=>import("@/pages/find")
  },
  {
    path: "/mine",
    name: "mine",
    component: () =>
      import("@/pages/mine"),
      children:[
        {
          path:'charge',
          component:()=>import('@/pages/mine/recharge')
        },
        {
          path:'stone',
          component:()=>import('@/pages/mine/mystone')
        },
        {
          path:'emplace',
          component:()=>import('@/pages/mine/emplace')
        },
      ] 
  },
  {
    path:"*",
    component:()=>import('@/pages/undefined')
  }
  
];

const router = new VueRouter({
  mode:"hash",
  routes,
});

export default router;
